Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 8eea3bb5bb2bdc432165f19ec2ce589a18c7d872


Parents : 43e1912
Author : Mark Qvist <mark@unsigned.io>
Date : 2024-06-06T13:20:58+02:00

Don't send empty commands

Changes

1 files changed, 6 insertions(+), 2 deletions(-)

M sbapp/main.py +6 -2

Diff

diff --git a/sbapp/main.py b/sbapp/main.py
index 074b5cca..4e57c77e 100644
--- a/sbapp/main.py
+++ b/sbapp/main.py
@@ -1250,8 +1250,12 @@ class SidebandApp(MDApp):
self.open_conversations(direction="right")
def message_send_action(self, sender=None):
- if not (self.attach_type != None and self.attach_path != None) and self.messages_view.ids.message_text.text == "":
- return
+ if self.messages_view.ids.message_text.text == "":
+ if not (self.attach_type != None and self.attach_path != None):
+ return
+
+ if self.outbound_mode_command:
+ return
def cb(dt):
self.message_send_dispatch(sender)


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────